#include "abstractobject.h"

AbstractObject::AbstractObject(QObject *parent, const QString& name)
	: QObject(parent)
	, m_guid(QUuid::createUuid())
	, m_name(name)
{

}

const QUuid& AbstractObject::guid() const
{
	return m_guid;
}

void AbstractObject::setGuid( const QUuid& guid )
{
	m_guid = guid;
}

void AbstractObject::setName(const QString &name)
{
	if(m_name != name)
	{
		m_name = name;
		emit dataChanged();
	}
}

const QString &AbstractObject::name() const
{
	return m_name;
}